/*
 ============================================================================
 Name        : Main.c
 Author      : Sherry Krikszer
 Version     : 1.0
 Copyright   : 
 Description : in C, Ansi-style
 ============================================================================
 */

#include <stdio.h>
#include <stdlib.h>

#include "Assembler.h"

#define AT_LEAST_ONE_FILE 2
#define PROGRAM_NAME_INDEX 0

/* The main entry point of the application */
int main(int argc, char *argv[])
{
	int index;

	if (argc >= AT_LEAST_ONE_FILE)
	{
		// Go over all the files the user requested, index starts at one to skip this program's name
		for (index = 1; index < argc; index++)
		{
			AssembleProgramFile(argv[index]);
		}
	}
	else
	{
		printf("Usage : %s <file name>\n", argv[PROGRAM_NAME_INDEX]);
		printf("(no extension is needed, note that the file supplied should be *.as file)");
	}
	return EXIT_SUCCESS;
}
